package com.itheima.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.itheima.pojo.Category;
import com.itheima.pojo.Code;
import com.itheima.pojo.Result;
import com.itheima.service.impl.CategoryServiceImpl;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Log4j2
@RestController
@RequestMapping("/category")
public class CategoryController {

    @Autowired
    private CategoryServiceImpl categoryServiceImpl;


    /**
     * 移动端分类页列表
     * @param
     * @return
     */
    @GetMapping("/list")
    public Result list(){
        // QueryWrapper wrapper = new QueryWrapper();

        return categoryServiceImpl.lists();
    }

}
